<body class="shop_products_list">
<table>
<tr>
<td class="fleche"><a class="bouton_retour" href="<?php echo base_url(); ?>shop/view/types_list" style="padding-left:35px;text-align:right">Retour</a></td>
<td class="fleche"><a class="bouton_avancer" href="<?php echo base_url(); ?>shop/view/commande" style="padding-left:50px;text-align:right">Ajout au panier</a></form></td>
</tr>
</table>
<br/><br/>
<?php


//connection à la base de données
		$link = mysql_connect('localhost','root');
		mysql_select_db('fromagerie',$link);
		mysql_set_charset('utf8');
		//Sélection de la table et des champs
		
		$id = $this->uri->segment(4);
		$sql="SELECT pro_id,pro_nom,pro_prix_kilo FROM tb_produit WHERE pro_fk_id_type = '$id' ";
		$sql2="SELECT type_image FROM tb_type WHERE type_id = '$id'";
		
		$req=mysql_query($sql);
		
		
		while($data = mysql_fetch_assoc($req))
		{
			$req2=mysql_query($sql2);
			$data2 = mysql_fetch_assoc($req2);
			$image=$data2['type_image'];
			// on affiche les informations de l'enregistrement en cours
			?>
			<form class="shop_titre_produits">
			<p class="shop_produit"><img width="35px" height="35px" align="left" src="<?php echo base_url(); ?><?php echo $image;?>"><?php echo $sql= $data['pro_nom'].' : '.$data['pro_prix_kilo']," CHF/kilos",'<br/>','<br/>';?></p>	
			</form>
			<?php 
			
			$id1=$data['pro_id'];
			$sql1="SELECT emb_description,emb_id,emb_poids,emb_prix FROM tb_emballage WHERE emb_fk_id_pro = '$id1'";
			$req1=mysql_query($sql1);
			?>
			<form>	<?php 
			while($data1 = mysql_fetch_assoc($req1))
			{

				?>	
									
				<input class="shop_radio" name='choix' type='radio' value="<?php echo $data1['emb_id'];?>" id="<?php echo $data1['emb_description']?>">	<?php echo $sql1= $data1['emb_description'],'<br/>';?>			
				
				<?php 			
				
			}
			echo '<br/>';
			?>
			</form>
			
			<form>
			<p class="shop_text_nbr">Nombre d'articles : <input class="shop_nbr_art" value="0" type="number" name="nbr_art" maxlength="3"><br></p>
			</form>	
			<?php 
			echo '<br/>','<br/>';
			
		}
		mysql_close();
		
		
		
?>
</body>